<div class="panes_vertical">
  <div class="box">
  	<div class="panes_horizontal"> 
  	<{if $isUpdateSuccessfull}>
  	<div class="success">Your changes have been saved</div>
  	<{/if}>
  	<form method="post" action="<{$APPLICATION_URL}>/Admin/StaticPage/edit" name="frmForm" enctype="multipart/form-data" onsubmit="return formSubmit();">
    <fieldset>
    	<legend><strong>&nbsp;&nbsp;Content&nbsp;&nbsp;</strong></legend>
        
		<p>
					<label>Head Title:</label>
					<input type='text' id='headTitle' name='headTitle' value='<{$headTitle}>' class="textfield" style="width: 90%;" max-length="255">					
				</p>
				<p>
					<label>Meta Description:</label>
					<input type='text' id='metaDescription' name='metaDescription' value='<{$metaDescription}>' class="textfield" style="width: 90%;"  max-length="255">					
				</p>
				<p>
					<label>Meta Keywords:</label>
					<input type='text' id='metaKeywords' name='metaKeywords' value='<{$metaKeywords}>' class="textfield" style="width: 90%;"  max-length="255">					
				</p>
				<div id="page-wrap">
        <table id="feature-table">
			<colgroup class="plus" ></colgroup>
            <colgroup class="basic"></colgroup>
            <colgroup class="plus"></colgroup>
            <colgroup class="premium" id="featured" ></colgroup>
            <colgroup class="pro"></colgroup>        	
        	<tbody>
				<tr>
					<td></td>
        			<td class="head_title"><{$option1->name}></td>
        			<td class="head_title"><{$option2->name}></td>
        			<td class="head_title"><{$option3->name}></td>
        			<td class="head_title"><{$option4->name}></td>
        		</tr>
        		<tr>
					<td>Fee Per Month</td>
        			<td class="head_title_price">£<{$option1->price}>/month</td>
        			<td class="head_title_price">£<{$option2->price}>/month</td>
        			<td class="head_title_price">£<{$option3->price}>/month</td>
        			<td class="head_title_price">£<{$option4->price}>/month</td>
        		</tr>
        		<tr>
				<td>CMS</td>
        			<td><{$option1->hasCMS()}></td>
        			<td><{$option2->hasCMS()}></td>
        			<td><{$option3->hasCMS()}></td>
        			<td><{$option4->hasCMS()}></td>
        		</tr>
        		<tr>
					<td>Page Included</td>
        			<td><{$option1->hasPageIncluded()}></td>
        			<td><{$option2->hasPageIncluded()}></td>
        			<td><{$option3->hasPageIncluded()}></td>
        			<td><{$option4->hasPageIncluded()}></td>
        		</tr>
        		<tr>
				<td>Blogging System</td>
        			<td><{$option1->hasBlogging()}></td>
        			<td><{$option2->hasBlogging()}></td>
        			<td><{$option3->hasBlogging()}></td>
        			<td><{$option4->hasBlogging()}></td>
        		</tr>
        		<tr>
				<td>Image Gallery</td>
        			<td><{$option1->hasGallery()}></td>
        			<td><{$option2->hasGallery()}></td>
        			<td><{$option3->hasGallery()}></td>
        			<td><{$option4->hasGallery()}></td>
        		</tr>
        		<tr>
				<td>Ecommerce Solutions</td>
        			<td><{$option1->hasEcommerce()}></td>
        			<td><{$option2->hasEcommerce()}></td>
        			<td><{$option3->hasEcommerce()}></td>
        			<td><{$option4->hasEcommerce()}></td>
        		</tr>
        		<tr>
				<td>News Section</td>
        			<td><{$option1->hasNews()}></td>
        			<td><{$option2->hasNews()}></td>
        			<td><{$option3->hasNews()}></td>
        			<td><{$option4->hasNews()}></td>
        		</tr>
				<!--
        		<tr>
				<td>Custom Design</td>
        			<td><{$option1->hasCustomDesign()}></td>
        			<td><{$option2->hasCustomDesign()}></td>
        			<td><{$option3->hasCustomDesign()}></td>
        			<td><{$option4->hasCustomDesign()}></td>
        		</tr>
				-->
        		<tr>
				<td>Use Own Domanin Name</td>
        			<td><{$option1->hasOwnDomain()}></td>
        			<td><{$option2->hasOwnDomain()}></td>
        			<td><{$option3->hasOwnDomain()}></td>
        			<td><{$option4->hasOwnDomain()}></td>
        		</tr>
        		<tr>
				<td>Free Hosting</td>
        			<td><{$option1->hasFreeHosting()}></td>
        			<td><{$option2->hasFreeHosting()}></td>
        			<td><{$option3->hasFreeHosting()}></td>
        			<td><{$option4->hasFreeHosting()}></td>
        		</tr>
        		<!--
				<td>Branding Free</td>
        			<td><{$option1->hasFreeBranding()}></td>
        			<td><{$option2->hasFreeBranding()}></td>
        			<td><{$option3->hasFreeBranding()}></td>
        			<td><{$option4->hasFreeBranding()}></td>
        		</tr>
        		-->
        		<tr>
				<td></td>
        			<td><a class="button" href="<{$APPLICATION_URL}>/Admin/Settings/EditPackage/id/1">Edit Package</a></td>
        			<td><a class="button" href="<{$APPLICATION_URL}>/Admin/Settings/EditPackage/id/2">Edit Package</a></td>
        			<td><a class="button" href="<{$APPLICATION_URL}>/Admin/Settings/EditPackage/id/3">Edit Package</a></td>
        			<td><a class="button" href="<{$APPLICATION_URL}>/Admin/Settings/EditPackage/id/4">Edit Package</a></td>
        		</tr>
        	</tbody>
        </table>
		</div>
        <p>
        	<input type="submit" name="save" class="button" id="save" value=" Update "/>
        	<input type="button" name="cancel" class="button" id="cancel" value=" Cancel "  onclick="javascript: document.location.href='<{$APPLICATION_URL}>/Admin/StaticPage'" />
        	<input type="hidden" id="actionForm" name="actionForm" value=""/>
        	<input type="hidden" name="page" value="<{$page}>" />
        	<input type="hidden" id="actionKey" name="actionKey" value="<{$actionKey}>" />
      	</p>
    </fieldset>   
    </form>
    </div>
  </div>
</div>
<script type="text/javascript">
    function formSubmit()
    {
    	var theform = document.frmForm;
    	
    	// Check Content of static page
    	var description = theform.description.value;
    	if (description == ''){
			alert('Please enter content');
			theform.description.focus();
			return false;
    	} 
    	
    	theform.actionForm.value = 'submit';
    	// theform.submit();
    	return true;
    }
</script>

<script type="text/javascript" src="<{$APPLICATION_URL}>/Libraries/External/fckeditor/fckeditor.js"></script>
<script type="text/javascript">
<!--
/*
var sToolbar;
var oFCKeditor = new FCKeditor('news_body');
oFCKeditor.BasePath = "./include/fckeditor/";
var sSkinPath = 'skins/silver/'; 	                  

oFCKeditor.Config["CustomConfigurationsPath"] = "../../js/blog_fckconfig.js";
oFCKeditor.Config["DefaultLanguage"] = "{$language_code}";
oFCKeditor.Config['AutoDetectLanguage'] = false;
oFCKeditor.Height = "300";
oFCKeditor.Width = "502";
oFCKeditor.ToolbarSet = "se_blog";

oFCKeditor.Config['SkinPath'] = sSkinPath;
oFCKeditor.ReplaceTextarea() ;
//FCKeditor.ReplaceAllTextareas();
*/
	var textareaToEditor = function( textarea )
	{
		var editor = new FCKeditor( textarea.name ) ;
	
		//editor.Width = Math.max( textarea.offsetWidth, FCKeditor.MinWidth ) ;
		//editor.Height = Math.max( textarea.offsetHeight, FCKeditor.MinHeight ) ;
		editor.BasePath = "<{$APPLICATION_URL}>/Libraries/External/fckeditor/";
		editor.Config["CustomConfigurationsPath"] = "<{$APPLICATION_URL}>/Libraries/External/fckeditor/blog_fckconfig.js";
     	editor.Config["DefaultLanguage"] = "en";
    	editor.Config['AutoDetectLanguage'] = false;
    	editor.Height = "500";
    	editor.Width = "100%";
    	//editor.ToolbarSet = "se_blog";
    
    	editor.Config['SkinPath'] = 'skins/silver/';
		return editor ;
	};
	
	FCKeditor.ReplaceAllTextareas = function()
	{
		var textareas = document.getElementsByTagName( 'textarea' ) ;

		for ( var i = 0 ; i < textareas.length ; i++ )
		{
			var editor = null ;
			var textarea = textareas[i] ;
			var name = textarea.name ;

			// The "name" attribute must exist.
			if ( !name || name.length == 0 )
				continue ;

			if ( typeof arguments[0] == 'string' )
			{
				// The textarea class name could be passed as the function
				// parameter.

				var classRegex = new RegExp( '(?:^| )' + arguments[0] + '(?:$| )' ) ;

				if ( !classRegex.test( textarea.className ) )
					continue ;
			}
			else if ( typeof arguments[0] == 'function' )
			{
				// An assertion function could be passed as the function parameter.
				// It must explicitly return "false" to ignore a specific <textarea>.
				editor = textareaToEditor( textarea ) ;
				if ( arguments[0]( textarea, editor ) === false )
					continue ;
			}

			if ( !editor )
				editor = textareaToEditor( textarea ) ;

			editor.ReplaceTextarea() ;
		}
	};	                  
	FCKeditor.ReplaceAllTextareas();
//-->
</script>
